<template>
  <div id="bring_goods02">
    <p class="data_time">
      <span>数据更新时间：</span>
      <span>{{ timestamp(time, "Y-M-D h:m") }}</span>
    </p>
    <category_industry v-model="industryItemObj" :class="'mt_30'"/>
    <category_goods v-model="checkedDatasJoe"/>
    <section class="type">
      <time_options v-model="value03" :radio_values="['日榜', '周榜', '月榜']" :timing="$global.timing"/>
      <section class="input_group">
        <input
          type="text"
          v-model="input01"
          placeholder="请输入关键词在排行榜中搜索"
          @keyup.enter="search_input()"
        />
        <div @click="search_input()" class="imgBox">
          <!-- <img src="../../../assets/meng/search01.png" /> -->
        </div>
      </section>
      <div class="btn_group">
        <button @click="generatorImage">
          <span></span>分享
        </button>
        <button @click="export_data">
          <span></span>导出
        </button>
      </div>
    </section>
    <ul
      class="fixedThead"
      ref="fixedThead"
      :class="{ isShow: isFixed }"
      :style="showLeft == true ? 'left:222px' : 'left:98px'"
      v-if="table_data01.length"
    >
      <li tc>排名</li>
      <li>直播间</li>
      <li>达人</li>
      <li tc>直播时长</li>
      <li
        tc
        style="  cursor: pointer;"
        @click="sort_fun(false, 1)"
        v-if="order_by == 'desc' && sort != 'visitspeak'"
      >
        观看人数（峰值）
        <img
          src="@/assets/meng/down_up.png"
          v-if="order_by == 'desc' && sort == 'visitspeak'"
        />
        <img src="@/assets/meng/no_down_up.png" v-else />
      </li>
      <li tc v-if="order_by == 'desc' && sort == 'visitspeak'">
        观看人数（峰值）
        <img
          src="@/assets/meng/down_up.png"
          v-if="order_by == 'desc' && sort == 'visitspeak'"
        />
        <img src="@/assets/meng/no_down_up.png" v-else />
      </li>
      <!-- <li
        tc
        style="  cursor: pointer;"
        @click="sort_fun(false, 2)"
        v-if="order_by == 'desc' && sort != 'fansincr'"
      >
        粉丝变化
        <img
          src="@/assets/meng/down_up.png"
          v-if="order_by == 'desc' && sort == 'fansincr'"
        />
        <img src="@/assets/meng/no_down_up.png" v-else />
      </li>
      <li tc v-if="order_by == 'desc' && sort == 'fansincr'">
        粉丝变化
        <img
          src="@/assets/meng/down_up.png"
          v-if="order_by == 'desc' && sort == 'fansincr'"
        />
        <img src="@/assets/meng/no_down_up.png" v-else />
      </li>-->

      <li
        tc
        style="  cursor: pointer;"
        @click="sort_fun(false, 3)"
        v-if="order_by == 'desc' && sort != 'volume'"
      >
        直播销量（预估）
        <img src="@/assets/meng/down_up.png" v-if="order_by == 'desc' && sort == 'volume'" />
        <img src="@/assets/meng/no_down_up.png" v-else />
      </li>
      <li tc v-if="order_by == 'desc' && sort == 'volume'">
        直播销量（预估）
        <img src="@/assets/meng/down_up.png" v-if="order_by == 'desc' && sort == 'volume'" />
        <img src="@/assets/meng/no_down_up.png" v-else />
      </li>
      <li
        tc
        @click="sort_fun(false, 4)"
        style="  cursor: pointer;"
        v-if="order_by == 'desc' && sort != 'sales'"
      >
        直播销售额（预估）
        <img src="@/assets/meng/down_up.png" v-if="order_by == 'desc' && sort == 'sales'" />
        <img src="@/assets/meng/no_down_up.png" v-else />
      </li>
      <li tc v-if="order_by == 'desc' && sort == 'sales'">
        直播销售额（预估）
        <img src="@/assets/meng/down_up.png" v-if="order_by == 'desc' && sort == 'sales'" />
        <img src="@/assets/meng/no_down_up.png" v-else />
      </li>
      <li tc>操作</li>
    </ul>
    <table class="table" ref="tableEl">
      <thead>
        <tr>
          <th>排名</th>
          <th>直播间</th>
          <th>达人</th>
          <th>直播时长</th>
          <th
            style="  cursor: pointer;"
            @click="sort_fun(false, 1)"
            v-if="order_by == 'desc' && sort != 'visitspeak'"
          >
            观看人数（峰值）
            <img
              src="@/assets/meng/down_up.png"
              v-if="order_by == 'desc' && sort == 'visitspeak'"
            />
            <img src="@/assets/meng/no_down_up.png" v-else />
          </th>
          <th v-if="order_by == 'desc' && sort == 'visitspeak'">
            观看人数（峰值）
            <img
              src="@/assets/meng/down_up.png"
              v-if="order_by == 'desc' && sort == 'visitspeak'"
            />
            <img src="@/assets/meng/no_down_up.png" v-else />
          </th>
          <!-- <th
            style="  cursor: pointer;"
            @click="sort_fun(false, 2)"
            v-if="order_by == 'desc' && sort != 'fansincr'"
          >
            粉丝变化
            <img
              src="@/assets/meng/down_up.png"
              v-if="order_by == 'desc' && sort == 'fansincr'"
            />
            <img src="@/assets/meng/no_down_up.png" v-else />
          </th>
          <th v-if="order_by == 'desc' && sort == 'fansincr'">
            粉丝变化
            <img
              src="@/assets/meng/down_up.png"
              v-if="order_by == 'desc' && sort == 'fansincr'"
            />
            <img src="@/assets/meng/no_down_up.png" v-else />
          </th>-->

          <th
            style="  cursor: pointer;"
            @click="sort_fun(false, 3)"
            v-if="order_by == 'desc' && sort != 'volume'"
          >
            直播销量（预估）
            <img
              src="@/assets/meng/down_up.png"
              v-if="order_by == 'desc' && sort == 'volume'"
            />
            <img src="@/assets/meng/no_down_up.png" v-else />
          </th>
          <th v-if="order_by == 'desc' && sort == 'volume'">
            直播销量（预估）
            <img
              src="@/assets/meng/down_up.png"
              v-if="order_by == 'desc' && sort == 'volume'"
            />
            <img src="@/assets/meng/no_down_up.png" v-else />
          </th>
          <th
            @click="sort_fun(false, 4)"
            style="  cursor: pointer;"
            v-if="order_by == 'desc' && sort != 'sales'"
          >
            直播销售额（预估）
            <img
              src="@/assets/meng/down_up.png"
              v-if="order_by == 'desc' && sort == 'sales'"
            />
            <img src="@/assets/meng/no_down_up.png" v-else />
          </th>
          <th v-if="order_by == 'desc' && sort == 'sales'">
            直播销售额（预估）
            <img
              src="@/assets/meng/down_up.png"
              v-if="order_by == 'desc' && sort == 'sales'"
            />
            <img src="@/assets/meng/no_down_up.png" v-else />
          </th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody v-if="table_data01.length != 0 && !loading">
        <tr v-for="(item, index) in table_data01" :key="'table' + index" :id="!index ? 'tr1' : ''">
          <td class="td td_01">
            <div>{{ 30 * (page - 1) + index + 1 }}</div>
          </td>
          <td class="td td_02">
            <div>
              <img
                :src="item.room_logo"
                class="pointer"
                @click="go_to_page01(item.room_id)"
                @error="defaultImgFn(liveVideo,$event)"
              />
              <section>
                <div>
                  <img v-if="item.isShop == 1" src="../../../assets/meng/pop01.png" />
                  <img v-if="item.is_red == 1" src="../../../assets/meng/pop02.png" />
                  <span
                    class="dot pointer"
                    @click="go_to_page01(item.room_id)"
                  >{{ item.room_title }}</span>
                </div>
                <div></div>
              </section>
            </div>
          </td>
          <td class="td td_03">
            <div @click="goTalentDetails(item.author_id)">
              <img :src="item.logo" @error="defaultImgFn(superman,$event)" />
              <section>
                <div>
                  <span class="dot">{{ item.nickname }}</span>
                  <img v-if="item.isShop == 1" src="../../../assets/meng/search_result01.png" />
                  <!-- <img v-if="item.verifyType==1"
                       src="../../../assets/meng/search_result02.png">
                  <img v-if="item.verifyType==2"
                  src="../../../assets/meng/search_result03.png">-->
                </div>
                <div>粉丝数：{{ format_num(item.total_fans) }}</div>
              </section>
            </div>
          </td>
          <td class="td td_04">
            <div>
              {{
              format_time(
              (item.end_time_stamp - item.start_time_stamp) * 1000
              )
              }}
            </div>
          </td>
          <td class="td td_04">
            <div>{{ format_num(item.visit_speak) }}</div>
          </td>
          <!-- <td class="td td_05">
            <div>
              <img
                :class="{ gray_img: item.fans_incr == 0 }"
                :src="
                  '../../../../static/meng/fans0' +
                    (item.fans_incr > 0 ? 2 : item.fans_incr < 0 ? 3 : 1) +
                    '.png'
                "
              />
              <span
                :class="{
                  gray: item.fans_incr == 0,
                  red: item.fans_incr > 0,
                  blue: item.fans_incr < 0
                }"
                >{{ Math.abs(item.fans_incr) }}</span
              >
            </div>
          </td>-->
          <td class="td td_06">
            <div>{{ format_num(item.volume) }}</div>
          </td>
          <td class="td td_07">
            <div>{{ format_num(item.sales) }}</div>
          </td>
          <td class="td td_08">
            <button @click="go_to_page01(item.room_id)">查看详情</button>
          </td>
        </tr>
      </tbody>
    </table>
    <div class="upgradeBox" v-if="!permissions && !loading">
      <RankUpgrade class="rankUpgrade" />
    </div>
    <!-- 免费版只让看10条数据的时候在第一页底部显示 -->
    <!-- <div class="upgradeBox" v-if="permissions && !loading && vipLevel==0">
      <RankUpgrade class="rankUpgrade" />
    </div> -->
    <div
      class="pageBox"
      v-if="
        (table_data01.length != 0 && !loading) || (!permissions && !loading)
      "
    >
      <el-pagination
        background
        layout="prev, pager, next, jumper"
        :total="count"
        :page-size="30"
        :current-page="page"
        @current-change="get_data"
        :hide-on-single-page="true"
      ></el-pagination>
    </div>

    <div
      v-loading="loading"
      v-if="loading"
      class="loading"
      element-loading-text="拼命加载中..."
      element-loading-spinner="el-icon-loading"
    ></div>
    <!-- <p
      class="nothing"
      v-show="table_data01.length < 30 && !loading && table_data01.length != 0"
    >我是有底线的～</p> -->
    <div class="empty" v-show="!loading && table_data01.length == 0 && permissions">
      <img src="@/assets/liu/zw.png" />
      <p>暂无数据</p>
    </div>
  </div>
</template>
<script>
import category_goods from '@/component/category_goods';
import category_industry from '@/component/category_industry';
import html2canvas from 'html2canvas';
import RankUpgrade from '@/component/rankUpgrade.vue';
import superman from '@/assets/img/superman.png';
import liveVideo from '@/assets/img/live-video.png';
export default {
  name: 'bring_goods02',
  components: { RankUpgrade, category_goods, category_industry },
  data() {
    return {
      superman: superman,
      liveVideo: liveVideo,
      cancel: null,
      checkedDatasJoe: {
        //商品类目数据初始数据，新筛选组件用
        parentId: 0,
        childIds: []
      },
      permissions: 1,
      value02: '全部',
      value03: '日榜',
      busy: false,
      time: '',
      loading: true,
      table_data01: [],
      input01: '',
      count: 0,
      page: 1,
      isFixed: false,
      offsetTop: 0,
      showLeft: true,
      order_by: 'desc', //   表格头部排序
      sort: 'sales', //   表格头部排序
      value04: '全部',
      isShowList: '1',
      vipLevel: '',
      industryItemObj:{
        name:'全部',
        id:'0'
      }
    };
  },
  computed: {
    listen_change() {
      const { industryItemObj, value04 } = this;

      return {
        industryItemObj,
        value04
      };
    }
  },
  watch: {
    // 搜索框变为空时自动刷新
    input01: function (newVal, oldVal) {
      if (newVal == '') {
        this.table_data01 = [];
        this.page = 1;
        this.get_data();
      }
    },
    '$store.state.left_nav_flag'(old, newOld) {
      this.showLeft = newOld;
      if ((newOld = false)) {
        this.setTBBar();
      } else {
        this.setTBBar();
      }
    },
    checkedDatasJoe() {
      //新筛选组件用
      this.isShow();
      this.page = 1;
      this.table_data01 = [];
      this.get_data();
    }
  },
  created() {
    this.vipLevel = localStorage.getItem('vipLevel'); //会员等级
    // this.get_data() 因为time_options组件内部已经提交新值，导致v-model的值更改，所以已经执行请求函数
    this.$watch(
      'listen_change',
      this.debounce((newValue, oldValue) => {
        this.isShow();
        this.page = 1;
        this.table_data01 = [];
        this.get_data();
      }, 0)
    );
    this.$watch(
      'value02',
      this.debounce((newValue, oldValue) => {
        this.isShow();
        this.page = 1;
        this.table_data01 = [];
        this.get_data();
      }, 0)
    );
    this.$watch(
      'value03',
      this.debounce((newValue, oldValue) => {
        this.isShow();
        this.page = 1;
        this.table_data01 = [];
        this.get_data();
      }, 0)
    );
  },
  mounted() {
    window.addEventListener('scroll', this.initHeight);
    window.addEventListener('resize', () => {
      //给浏览器窗口绑定变化大小事件
      this.setTBBar();
    });
  },
  methods: {
    // 默认头像设置
    defaultImgFn(url, e) {
      if (url == superman) {
        e.target.src = superman;
      } else if (url == liveVideo) {
        e.target.src = liveVideo;
      }
    },
    isShow() {
    },
    //   表格头部排序
    sort_fun(parm01, parm02) {
      if (parm01) {
        this.order_by = 'asc';
      } else {
        this.order_by = 'desc';
      }
      switch (parm02) {
        case 1:
          this.sort = 'visitspeak';
          break;
        case 2:
          this.sort = 'fansincr';
          break;
        case 3:
          this.sort = 'volume';
          break;
        case 4:
          this.sort = 'sales';
          break;
      }
      this.get_data();
    },
    // 获取子节点函数（后期可集成到一个库里）
    getChilds(pNode) {
      if (!pNode) return false;
      let nodes = pNode.childNodes;
      let newList = [];
      for (let i = 0; i < nodes.length; i++) {
        let node = nodes[i];
        if (node.nodeType === 1) {
          //判断类型
          newList.push(node);
        }
      }
      return newList;
    },
    // 设置表格表头滑动置顶
    setTBBar() {
      this.$nextTick(() => {
        let tableEl = this.$refs.tableEl;
        let ulEl = this.$refs.fixedThead;
        let tr1 = document.querySelector('#tr1');
        // thTrEl.style.width = tableEl.offsetWidth+'px';
        if (tr1) {
          let tds = this.getChilds(tr1);
          let liEls = this.getChilds(ulEl);
          for (let i = 0; i < liEls.length; i++) {
            liEls[i].style.width = tds[i].offsetWidth + 'px';
          }
        }
      });
    },
    search_input() {
      this.page = 1;
      this.table_data01 = [];
      this.get_data();
    },
    get_data(cpage) {
      this.loading = true;
      let that = this;
      this.busy = true;
      if (cpage) {
        this.page = cpage;
        this.backTop();
        //console.log("page", this.page);
      }
      this.$axios
        .post(
          '/api/live/GetProLiveRank?api-version=2.0',
          {
            categoryIds: this.checkedDatasJoe.childIds,
            pro_category_id: this.checkedDatasJoe.parentId,
            category_id: this.industryItemObj.id,
            type:
              that.value03.split('?')[0] == '日榜'
                ? 1
                : that.value03.split('?')[0] == '周榜'
                ? 2
                : 3,
            page: that.page,
            size: 30,
            Keyword: this.trimStr(that.input01),
            day:
              that.value03.split('?')[1].length == 10
                ? that.value03.split('?')[1]
                : that.value03.split('?')[1].slice(11),
            orderby: that.sort,
            sort: that.order_by,
            c: this.isShowList
          },
          {
            cancelToken: new that.$axios.CancelToken(function executor(c) {
              if (that.cancel) {
                that.cancel();
              }
              that.cancel = c;
            })
          }
        )
        .then(response => {
          this.loading = false;
          if (response.data.code1 == 1013||response.data.code == 1003||response.data.code == 1013) {
            this.permissions = 0;
            this.table_data01 = [];
          } else {
            this.permissions = 1;
          }
          if (response.data.code == 0) {
            this.time = response.data.data.time;
            this.table_data01 = response.data.data.data;

            this.count = response.data.count;

            this.setTBBar();
          }
        })
        .catch(error => {
          // console.log(2);
          // this.loading = false;
          // console.log(error);
        });
    },
    generatorImage() {
      var that = this;
      const loading = this.$loading({
        lock: true,
        text: '导出中...',
        spinner: 'el-icon-loading',
        customClass: 'customClass'
      });
      var shareContent;
      shareContent = this.$refs.tableEl; //需要截图的包裹的（原生的）DOM 对象
      console.log(shareContent);
      var width = shareContent.offsetWidth; //获取dom 宽度
      var height = shareContent.offsetHeight; //获取dom 高度
      var canvas = document.createElement('canvas'); //创建一个canvas节点
      //   var scale = window.devicePixelRatio //定义任意放大倍数 支持小数 //   var scale = 2 //定义任意放大倍数 支持小数
      var scale = 1;
      canvas.width = width * scale * scale; //定义canvas 宽度 * 缩放
      canvas.height = height * scale * scale; //定义canvas高度 *缩放
      canvas.style.width = width + 'px';
      canvas.style.height = height + 'px';
      canvas.getContext('2d').scale(scale, scale); //获取context,设置scale
      var opts = {
        dpi: window.devicePixelRatio,
        scale: scale, // 添加的scale 参数
        useCORS: true,
        canvas: canvas, //自定义 canvas
        logging: true //日志开关
      };
      html2canvas(shareContent, opts).then(canvas => {
        let str;
        str = `《直播带货榜-${that.value03.split('?')[1]}》.png`;
        canvas.toBlob(
          function (blob) {
            const eleLink = document.createElement('a');
            eleLink.download = str;
            eleLink.style.display = 'none';
            // 字符内容转变成blob地址
            eleLink.href = URL.createObjectURL(blob);
            // 触发点击
            document.body.appendChild(eleLink);
            eleLink.click();
            // 然后移除
            document.body.removeChild(eleLink);
          },
          'image/png',
          1
        );
        loading.close();
      });
    },
    export_data() {
      let that = this;
      // let str = `排名,直播间,直播时长,达人,粉丝数,观看人数（峰值）,粉丝变化,直播销量（预估）,直播销售额（预估）\n`;
      let str = `排名,直播间,达人,直播时长,观看人数（峰值）,直播销量（预估）,直播销售额（预估）\n`;
      for (let i = 0; i < that.table_data01.length; i++) {
        str += `${i + 1},\"${that.table_data01[i].room_title.replace(
          /"/g,
          '""'
        )}\",\"${that.table_data01[i].nickname.replace(/"/g, '""')}\",${that.format_time(
          (that.table_data01[i].end_time_stamp - that.table_data01[i].start_time_stamp) * 1000
        )},${that.format_num(that.table_data01[i].visit_speak)},${that.format_num(
          that.table_data01[i].volume
        )},${that.format_num(that.table_data01[i].sales)}\n`;
      }
      var blob = new Blob([str], { type: 'text/plain;charset=utf-8' }); //解决中文乱码问题
      blob = new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });
      let object_url = window.URL.createObjectURL(blob);
      var link = document.createElement('a');
      link.href = object_url;
      let str_name = `《直播间带货榜-${that.value03.split('?')[1]}》.csv`;
      link.download = str_name;
      document.body.appendChild(link);
      link.click();
      document.body.removeChild(link);
    },
    loadMore: function () {
      if (this.page == 31) {
        return false;
      }
      this.get_data();
    },
    go_to_page01(id) {
      let router = this.$router.resolve({
        path: `/talent_main/liveDetailsRoot/${id}/0`
      });
      window.open(router.href, '_blank');
    },
    goTalentDetails(id) {
      let router = this.$router.resolve({
        path: `/talent_main/tdetails/${id}/${0}`
      });
      window.open(router.href, '_blank');
    },
    initHeight() {
      var scrollTop =
        window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
      this.isFixed = scrollTop > 340 ? true : false;
    },
    backTop() {
      document.body.scrollTop = document.documentElement.scrollTop = 0;
    }
  },
  destroyed() {
    window.removeEventListener('scroll', this.initHeight);
  }
};
</script>
<style scoped lang="less">
/* 搜索框 */
.imgBox {
  background: url('../../../assets/wang/talentCompare/search-nohover.png') no-repeat 10px 7px, #fff;
  background-size: 15px 15px;
}
.imgBox:hover {
  background: url('../../../assets/wang/talentCompare/search.png') no-repeat 10px 7px, #fff;
  background-size: 15px 15px;
}
.data_time {
  margin-top: -42px;
  margin-bottom: 10px;
  margin-right: 0px;
  text-align: right;
  > span:first-child {
    font-size: 14px;
    color: #888888;
    // margin-right: 9px;
    letter-spacing: 0;
  }
  > span:last-child {
    font-size: 15px;
    // font-family: DINAlternate-Bold;
    letter-spacing: 0;
    color: #888;
  }
}
.table {
  position: relative;
  thead {
    tr {
      > th:nth-child(1) {
        width: 6%;
      }
      > th:nth-child(2) {
        width: 300px;
        text-align: left;
        padding-left: 8px;
      }
      > th:nth-child(3) {
        width: 280px;
        text-align: left;
        padding-left: 30px;
      }
      > th:nth-child(5),
      > th:nth-child(7),
      > th:nth-child(8) {
        img {
          width: 5px;
          height: 10px;
          margin-left: -8px;
        }
      }
      > th:nth-child(6) {
        img {
          width: 5px;
          height: 10px;
        }
      }
    }
    img {
      vertical-align: 0px;
    }
  }
  tbody {
    tr {
      height: 78px;
    }
    .td_08 {
      text-align: center;
      button {
        width: 88px;
        height: 32px;
        background-color: transparent;
        border-radius: 4px;
        border: 1px solid #fd7f2c;
        font-size: 14px;
        font-weight: normal;
        font-stretch: normal;
        line-height: 30px;
        letter-spacing: 0px;
        color: #fd7f2c;
        text-align: center;
      }
      button:hover {
        border: 1px solid #ff924b;
        color: #ff924b;
      }
    }
    .td_01 {
      > div {
        font-family: DINAlternate-Bold;
        display: flex;
        align-items: center;
        > span:first-child {
          display: inline-block;
          width: 60px;
          text-align: right;
          font-size: 14px;
        }
        > section {
          text-align: left;
          width: 90px;
          .new_font {
            font-size: 14px;
            color: #fd7f2c;
            vertical-align: 3px;
            margin-left: 8px;
          }
          img {
            width: 8px;
            height: 12px;
            margin-top: -3px;
            margin-left: 8px;
            margin-right: 6px;
          }
          span {
            font-size: 15px;
            vertical-align: 1px;
          }
          .gray_img {
            width: 12px !important;
            height: 8px !important;
            margin-left: 6px !important;
            margin-right: 4px !important;
          }
        }
      }
    }
    .td_05 {
      > div {
        text-align: left;
        .new_font {
          font-size: 15px;
          color: #fd7f2c;
          vertical-align: 3px;
          margin-left: 8px;
        }
        img {
          width: 8px;
          height: 12px;
          margin-top: -3px;
          margin-right: 6px;
        }
        span {
          font-size: 15px;
          vertical-align: 1px;
        }
        .gray_img {
          width: 12px !important;
          height: 8px !important;
          margin-left: 6px !important;
          margin-right: 4px !important;
        }
      }
    }
    .td_01,
    .td_04,
    .td_07,
    .td_05,
    .td_06 {
      font-family: DINAlternate-Bold;
      font-size: 15px;
      text-align: center;
    }
    .td_07 {
    }
    .td_03 {
      padding-left: 20px;
      > div {
        cursor: pointer;
        justify-content: left !important;
        section {
          > div:first-child {
            display: flex;
            align-items: center;
            > span {
              width: 200px;
              display: block;
              word-break: break-all;
              font-size: 14px;
              font-weight: 600;
              color: #222222;
              margin-bottom: 5px;
            }
            > span:hover {
              color: #fd7f2c;
            }
            img {
              width: 16px;
              height: 16px;
              margin-left: 6px;
            }
          }
          > div:last-child {
            width: 100%;
            word-break: break-all;
            font-size: 14px;
            color: #888;
          }
        }
        > img {
          border-radius: 50%;
          width: 50px;
          margin-right: 12px;
          object-fit: cover;
          border: 1px solid #e5e5e5;
        }
      }
    }
    .td_02 {
      > div {
        justify-content: left !important;
        section {
          > div:nth-child(1) {
            display: flex;
            align-items: center;
            > span {
              width: 200px;
              display: block;
              word-break: break-all;
              font-size: 14px;
              color: #222222;

              font-weight: 600;
            }
            > span:hover {
              color: #fd7f2c;
            }
            img {
              height: 16px;
              margin-right: 6px;
            }
          }
          > div:nth-child(2) {
            width: 100%;
            word-break: break-all;
            font-size: 14px;
            color: #555555;
          }
          > p:nth-child(3) {
            button {
              padding: 3px 10px;
              border-radius: 21px;
              border: solid 1px #1779ff;
              background-color: #f5f9ff;
              font-size: 14px;
              color: #1779ff;
              margin-right: 10px;
              margin-top: 7px;
            }
          }
        }
        > img {
          width: 50px;
          height: 50px;
          object-fit: cover;
          border-radius: 6px;
          margin-right: 12px;
          border: 1px solid #e5e5e5;
        }
      }
    }
    .td {
      > div {
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }
  }
}
.type {
  margin-bottom: 14px;
  > div {
    display: inline-block;
  }
  .input_group {
    display: inline-block;
    margin-left: 11px;
    position: relative;
    width: 308px;
    height: 32px;
    border-radius: 4px 4px 4px 4px;
    border: solid 1px #e5e5e5;
    box-sizing: border-box;
    input {
      width: 100%;
      font-size: 14px;
      vertical-align: -1px;
      background-color: #f5f5f5;
      height: 100%;
      box-sizing: border-box;
      padding-left: 11px;
      padding-right: 38px;
      border: none;
      color: #222;
    }
    input::-webkit-input-placeholder {
      color: #b5b5b5 !important;
    }
    > div {
      position: absolute;
      right: 0;
      cursor: pointer;
      top: 0;
      text-align: center;
      width: 40px;
      height: 30px;
      border-radius: 0px 4px 4px 0px;
      display: flex;
      align-items: center;
      justify-content: center;
      img {
        width: 15px;
      }
    }
  }
  .btn_group {
    text-align: right;
    float: right;
    button {
      width: 70px;
      height: 32px;
      border-radius: 4px;
      border: solid 1px #e5e5e5;
      font-size: 14px;
      // line-height: 30px;
      box-sizing: border-box;
      color: #555;
      text-align: center;
    }
    button:nth-of-type(2) {
      color: #67ac5b;
      border: 1px solid #67ac5b;
    }

    > button:nth-child(1) {
      margin-right: 10px;
      span {
        display: inline-block;
        width: 14px;
        height: 14px;
        background: url('../../../assets/zhao/fenx.png') no-repeat;
        background-size: 100% 100%;
        margin-right: 4px;
        position: relative;
        top: 2px;
      }
    }
    > button:nth-child(2) {
      span {
        display: inline-block;
        width: 14px;
        height: 14px;
        background: url('../../../assets/zhao/daoc.png') no-repeat;
        background-size: 100% 100%;
        margin-right: 4px;
        position: relative;
        top: 2px;
      }
    }
    button:nth-of-type(1):hover {
      color: #777;
      span {
        background: url('../../../assets/zhao/fenx_h.png') no-repeat;
        background-size: 100% 100%;
      }
    }
    button:nth-of-type(2):hover {
      color: #80be76;
      border-color: #80be76;
      span {
        background: url('../../../assets/zhao/daoc_h.png') no-repeat;
        background-size: 100% 100%;
      }
    }
  }
}
#bring_goods02 {
  padding-bottom: 1px;
  padding-top: 10px;
  // min-width: 1380px;
  padding-left: 20px;
  padding-right: 20px;
  min-height: 100vh;
  .paginationBox {
    width: 100%;
    background-color: #fff;
    // margin-top: 10px;
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
    // padding-left: 1000px;
    .el-pagination {
      float: right;
    }
  }
  // 升级会员
  .upgradeBox {
    min-height: 60vh;
    position: relative;
    .rankUpgrade {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
  }
}
.fixedThead {
  display: none;
  position: fixed;
  top: 60px;
  left: 200px;
  min-width: 1380px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  background-color: #f5f9ff;
  height: 48px;
  line-height: 48px;
  overflow: hidden;
  z-index: 99;
  font-size: 0;
  white-space: nowrap;
  li {
    box-sizing: border-box;
    display: inline-block;
    font-size: 14px;
  }
  li:nth-child(3) {
    padding-left: 20px;
  }
  &.isShow {
    display: block;
  }
  img {
    width: 5px;
    height: 10px;
    vertical-align: 0px;
  }
  li:nth-child(5),
  li:nth-child(7),
  li:nth-child(8) {
    img {
      width: 5px;
      height: 10px;
      margin-left: -8px;
    }
  }
}
[tc] {
  text-align: center;
}
[tl] {
  text-align: left;
}
[tr] {
  text-align: right;
}
</style>
